<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery-3.7.1.min.js"></script>
    <style>
        .box{
            width: 200px;
            height: 200px;
            background-color: red;
        }
    </style>
</head>
<body>
    <div class="box"></div>
    <div class="container"></div>
    <script>
        //通过.css获取当前元素样式
        var color=$(".box").css("background-color")
        console.log(color);

        $(".container").css("height","200px")

        $(".container").css({
            width:"200px",
            height:"200px",
            //如果涉及到-的形式，写成驼峰命名法：front-size ->fontsize
            backgroundColor:"green"
            
        })
        
    </script>
</body>
</html>